<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/3/26
 * Time: 18:26
 */

namespace app\admin\model;


use think\Db;

class NewsLunbo extends BaseModel
{
    /**
     * 获取轮播图列表
     * @param $page
     * @param $pageSize
     * @param $where
     * @param $order
     * @param $field
     * @return array
     * @throws \think\exception\DbException
     */
    public static function getLunboNews($page,$pageSize,$where,$order,$field)
    {
        $list = Db::name("news_lunbo")->alias("a")
            ->join("news b","a.news_id = b.id")
            ->where($where)
            ->field($field)
            ->order($order)
            ->paginate(array('list_rows' => $pageSize, 'page' => $page))
            ->toArray();
        return $list;
    }
}